STRM     = stream.x

#List of sources
C_STRM   = main.c ffts.c io.c

# Compilers
CC      = gcc
LINK    = gcc
OPT     = -O3

#-----------------------------
#generic

LIB_FFT         = -lfftw3 -lm
INC_FFT         =
LIB_ADD         =


#-----------------------------

OBJ_STRM        = $(C_STRM:.c=.o) $(F_STRM:.f=.o)


LIB_STRM         = $(LIB_FFT) $(LIB_ADD)
INC_STRM         = $(INC_FFT)

#-----------------------------

default: stream

.f.o:
	$(FC) $(FFLAGS) -c $<


stream:
	$(CC) $(OPT) $(DEF_STRM) $(INC_STRM) -c $(C_STRM)
	$(LINK) $(OPT) $(OBJ_STRM) $(LIB_STRM) -o $(STRM)

hostname:
	@echo $(HOSTNAME) $(INC_FFT)

clean:
	@echo "cleaning ..."
	rm -f *~ *.o

#-------------------------------


